}
+static void kick_pending_request_queues(void)
+{
+ /* We kick pending request queues if the ring is reasonably empty. */
+ if ( (nr_pending != 0) &&
+ (((req_prod - resp_cons) & (BLK_RING_SIZE - 1)) <
+ (BLK_RING_SIZE >> 1)) )
+ {
+ /* Attempt to drain the queue, but bail if the ring becomes full. */
+ while ( nr_pending != 0 )
+ {
+ do_xlblk_request(pending_queues[--nr_pending]);
+ if ( RING_PLUGGED ) break;
+ }
+ }
+}
+
+
static void xlblk_response_int(int irq, void *dev_id, struct pt_regs *ptregs)
{
int i;
resp_cons = i;
- /* We kick pending request queues if the ring is reasonably empty. */
- if ( (nr_pending != 0) &&
- (((req_prod - resp_cons) & (BLK_RING_SIZE - 1)) <
- (BLK_RING_SIZE >> 1)) )
- {
- /* Attempt to drain the queue, but bail if the ring becomes full. */
- while ( nr_pending != 0 )
- {
- do_xlblk_request(pending_queues[--nr_pending]);
- if ( RING_PLUGGED ) break;
- }
- }
+ kick_pending_request_queues();
spin_unlock_irqrestore(&io_request_lock, flags);
}
void blkdev_resume(void)
{
reset_xlblk_interface();
+ spin_lock_irq(&io_request_lock);
+ kick_pending_request_queues();
+ spin_unlock_irq(&io_request_lock);
}
if ( rx->status != RING_STATUS_OK )
{
- printk(KERN_ALERT "bad buffer on RX ring!(%d)\n", rx->status);
+ /* Gate this error. We get a (valid) slew of them on suspend. */
+ if ( np->state == STATE_ACTIVE )
+ printk(KERN_ALERT "bad buffer on RX ring!(%d)\n", rx->status);
dev_kfree_skb_any(skb);
continue;
}
__cli();
+ HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
clear_fixmap(FIX_SHARED_INFO);
HYPERVISOR_stop();
set_fixmap(FIX_SHARED_INFO, start_info.shared_info);
HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
+ memset(empty_zero_page, 0, PAGE_SIZE);
__sti();
}
pte = pte_offset(pmd, vaddr);
+#if 0 /* Not in Xen, since this breaks clear_fixmap. */
if (pte_val(*pte))
pte_ERROR(*pte);
+#endif
/* We queue directly, avoiding hidden phys->machine translation. */
queue_l1_entry_update(pte, phys | pgprot_val(prot));